﻿@{
    Layout = null;
    bool isAjax = Request.IsAjaxRequest();
    var objDiggInfoList = ViewBag.DiggInfoList as List<DiggInfo>;
}
@using CJAtech.BBS.DataEntity;
@model List<CommentInfo>
@if (Model.IsNoNull())
{
    bool flag = false;
    foreach (CommentInfo objCommentInfo in Model)
    {
        flag = objDiggInfoList.Any(c => c.ObjectId == objCommentInfo.CommentId.ToString());
        <li id="comment@(objCommentInfo.CommentId)" data-cid="@objCommentInfo.CommentId" @Html.Raw(isAjax ? "data-action='unbind'" : "")>
            <span><a href="javascript:void(0)" class="threadReply" data-pid="@ViewBag.id" data-uid="1000000" data-username="@objCommentInfo.NickName">@objCommentInfo.NickName</a>：</span>
            <span class="comcon">
                @Html.Raw(objCommentInfo.Content)
            </span>
            <div class="txtr mtop10">
                <a class="like mright20" data-praised="0" href="javascript:;" data-pid="@ViewBag.id" data-uid="1000000" data-uname="@objCommentInfo.NickName"><i class="@(flag ? "praise" : "noPraise")"></i><span class="num">@objCommentInfo.DiggCount</span></a>
                <a data-reply="1" data-username="@objCommentInfo.NickName" data-uid="1000000" data-pid="@ViewBag.id" href="javascript:;" class="threadReply detailComment"><i class="incoR spr"></i><span class="num">6</span></a>
            </div>
        </li>
    }
}